package model.vo;

import java.io.Serializable;
import javax.persistence.*;

import utils.FNVHash;

import java.util.Date;


/**
 * The persistent class for the errorticket database table.
 * 
 */
public class MsgErrorticket implements Serializable {
	private static final long serialVersionUID = 1L;

	public Long id;

	public String certificateno;

	public String certificatetype;

	public Long createby;

	public Long createtime;

	public String customername;

	@Temporal(TemporalType.DATE)
	public Date departdate;

	public String departorgcode;

	public String orderno;

	public String phone;

	public String remark;

	public Integer ticketnum;

	public Long updateby;

	public Long updatetime;
	
	public Long hashid;

	public Long getHashid() {
		return FNVHash.hash64(departorgcode+departdate.getTime()+orderno+phone+
				certificateno+certificatetype+createtime);
	}

	public MsgErrorticket() {
	}

	public MsgErrorticket(Long id, String certificateno, String certificatetype,
			Long createby, Long createtime, String customername,
			Date departdate, String departorgcode, 
			String orderno, String phone, String remark, Integer ticketnum,
			Long updateby, Long updatetime, Long hashid) {
		super();
		this.id = id;
		this.certificateno = certificateno;
		this.certificatetype = certificatetype;
		this.createby = createby;
		this.createtime = createtime;
		this.customername = customername;
		this.departdate = departdate;
		this.departorgcode = departorgcode;
		this.orderno = orderno;
		this.phone = phone;
		this.remark = remark;
		this.ticketnum = ticketnum;
		this.updateby = updateby;
		this.updatetime = updatetime;
		this.hashid = getHashid();
	}
	
	

}